home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / comms / other / iris / irisrmail.irx < prev    next >
Text File  |  1999-05-14  |  1KB  |  43 lines

  1. /* REXX-script to read mail into Iris
  2.    $VER: IrisRMail.irx 1.2 (30.7.98) supplied with Iris V1.6
  3. */
  4.  
  5. if ~show('l','rexxsupport.library') then addlib('rexxsupport.library',0,-30,0) else nop
  6.  
  7. if showlist('a','AMITCP') then do
  8.   irispath='AMITCP:Iris/Iris' /* 
  9.                                * This may need adaptation. You may remove
  10.                                * all these if's and just include the path.
  11.                                */
  12. end
  13. else do
  14.   if showlist('v','WORK') then do
  15.     irispath='Work:Iris/Iris'
  16.   end
  17.   else do
  18.     irispath='SYS:Iris/Iris'
  19.   end
  20. end
  21.  
  22. arg filename
  23.  
  24. if ~exists(irispath) then
  25. do
  26.     reqbody='"The path of Iris is wrong.*N'
  27.     reqbody=reqbody||'Please change it in the*Nscript."'
  28.     address command 'requestchoice "IrisRMail.irx"' reqbody '"Abort"'
  29.     exit 20
  30. end
  31.  
  32. if ~show('P','IRIS') then
  33. do
  34.     address command 'run <nil: >nil: '||irispath
  35.     address command 'WaitForPort IRIS'
  36.     if rc~=0 then do
  37.         address command 'requestchoice "IrisRMail" "Iris' ARexx port doesn't appear." "Abort"'
  38.         exit 20
  39.     end
  40. end
  41.  
  42. address 'IRIS' 'READMESSAGE' filename '0 *'
  43.